﻿using System.Windows;
using Effector.Dialogs;

namespace Effector
{
    /// <summary>
	/// The main window of the effect editor.
    /// </summary>
    public partial class MainWindow : Window
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
        }

        ///<todo>
        ///open a new file on the the tab viewer effect editor.
        ///that means create a new tab with header the filename and a new 
        ///textbox or ritchtextbox inside empty.
        ///</todo>
        private void NewEffectMenu_Clicked(object sender, RoutedEventArgs e)
        {
            NewEffectFileDialog newfile = new NewEffectFileDialog();
            newfile.Owner = this;

            if (newfile.ShowDialog() == true)
            {
                //temporary.this would be save in the effect file class
                outputTextBox.AppendText(string.Format("Selected path: {0}\n", newfile.SelectedFilePath));
                outputTextBox.AppendText(string.Format("Selected filename: {0}\n", newfile.SelectedEffectFile));
            }
        }

        //event handler to shutdown the application when the exit menu is clicked
        private void ExitMenu_Clicked(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
